package PL.practica1;

import java.io.PrintWriter;

public class Invitacion {
	
	private Front front;
	private Body body;
	private Back back;


	public Invitacion() {
		setFront(new Front());
		setBody(new Body());
		setBack(new Back());
	}
	

	public Front getFront() { return front;	}
	public void setFront(Front front) { this.front = front;	}
	
	public void completarFront(String texto) {
		getFront().rellenarFront(texto);
	}
	
	public void escribirFront(PrintWriter fich) {
		
		fich.println("<P><TABLE>");
		fich.println("<TBODY>");
		fich.println(getFront().translateTo());
		fich.println(getFront().translateDate());
		fich.println(getFront().translateWhere());
		fich.println(getFront().translateWhy());
		fich.println("</TBODY>");
		fich.println("</TABLE>");
	}

	
	public Body getBody() { return body; }
	public void setBody(Body body) { this.body = body; }
	
	public void escribirBody(PrintWriter fich) {
		
		fich.println(getBody().translatePar());
		
	}
	
	
	public Back getBack() { return back; }
	public void setBack(Back back) { this.back = back; }
	
	public void escribirBack(PrintWriter fich) {
		
		fich.println(getBack().translateSignature());
		
	}

}
